#!/usr/bin/env python
# -*- coding:utf-8 -*-
# Author:Taotie Ren

#%s %d 占位符
#format

# s = "阿朵发送到 %s adfa %d" %('tom',123)
# print(s)


# s = "阿朵发送到 %(name)s adfa %(age)d" %{'name':'Tom','age':18}
# print(s)

#flag width 一起使用
#flag   +    右对齐，正数加正号，负数加负号
#       -    左对齐，正数无符号，负数加负号
#       空格  右对齐，正数加空格，负数增加负号
#       0    右对齐, 正数输出无符号，负数增加负号，用0填充空白处
# s = "阿朵发送到 %(name)+10s adfa %(age)d %(p).2f" %{'name':'Tom','age':18,"p":3.1415926}
# print(s)

# s = "%c ---- %o ----%x-----%E-----%g"%(65,15,15,10000000000000,100000)
# print(s)
#
# s1 = "Tom %"
# print(s1)
# # 当格式化时，字符串中出现占位符 %s... 需要用%%输出%
# print(s2)

#
# s1  = "qazwsxedc{0}12345{0}12345{1}".format(123,"Tom")
# print(s1)


# s1  = "_____{Name:s}______{Age:d}_____{Name:s}".format(Name = 'Tom' , Age = 10)
# print(s1)

# s2 = "-----{:*^30s}-----{:+d}-----{:#x}".format('Tom',1234567890,963)
# print(s2)

# s3 = "qwertyuio{:.2%}".format(1.1752)
# print(s3)


# li = [11,22,33,44]
# result = filter(lambda x:x>22,li)
# print(result) # 具有生成制定条件数据的能力的一个对象
#生成器 使用函数创造

# def func():
# 	return 2333
#
# ret = func()

# def func():
# 	# print("start")
# 	yield 1
# 	yield 2
# 	yield 3
#
# ret = func()
# # for i in ret:
# # 	print(i)
#
# r = ret.__next__()#进入函数找到yield，将yield后面的数据取出并退出
# print(r)

# def myrange(arg):
# 	start = 0
# 	while True:
# 		if start > arg:
# 			return
# 		yield start
# 		start +=1
#
# ret = myrange(10)
# # r = ret .__next__()
# # print(r)
# for item in ret:
# 	print(item)

'''
def a():
	r = b()
	print(r)

def b():
	r = c()
	return (r)


def c():
	r = d()
	return r


def d():
	return "23333"


a()
'''


def func(n):
	n += 1
	if n >= 4:
		return "end"
	return func(n)

r = func(1)
print(r)













